define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";

	var app = require('mokit/app');
	var ProjectListView = require('../views/ucenter-project-data');
	var commonUtils = require('../common/utils');
	var Uproject = require('../models/Uproject');

	/**
	 * 社友录页面控制器
	 */
	return app.controller.create({
		isSetting: true,
		/**
		 * 默认action
		 */
		index: function(context) {
			var self = this;
			//Uproject.getDataList(context.routeData.pid, function() {
				self.setView(new ProjectListView({
					model: Uproject
				}));
			//});
		},
		//添加资料
		addData: function(context) {
			var view = this.rootView;
			var info = {}
			Uproject.addData(info, function(err) {
				if (err) {
					view.toast(context, err);
				} else {
					view.drawer.close(function() {						
						view.render();
					});
				}
			});
		}
	});

});